package Shop;

class Customer { 
	private String[] username;
  	private String[] password;
  	private String[] sex;
  	private String[] address;
  	private int[] phone;
  	public Customer(String[] username, String[] password, String[] sex, String[] address, int[] phone) {
  	    super();
		this.username = username;
		this.password = password;
		this.sex = sex;
		this.address = address;
		this.phone = phone;
	}
  	public void initial(){
  	    username[0] = "Q";  password[0] = "1206";  sex[0] = "W";  address[0] = "qqqqqqq";  phone[0] = 10011;
		username[1] = "F";  password[1] = "0713";  sex[1] = "M";  address[1] = "fffffff";  phone[1] = 10022;
	    username[2] = "D";  password[2] = "3071";  sex[2] = "W";  address[2] = "ddddddd";  phone[2] = 10033;
	    username[3] = "G";  password[3] = "0921";  sex[3] = "W";  address[3] = "ggggggg";  phone[3] = 10044;
	    username[4] = "H";  password[4] = "0816";  sex[4] = "M";  address[4] = "hhhhhhh";  phone[4] = 10055; 
	    username[5] = "K";  password[5] = "1223";  sex[5] = "W";  address[5] = "kkkkkkk";  phone[5] = 10066; 
	    username[6] = "B";  password[6] = "1221";  sex[6] = "M";  address[6] = "bbbbbbb";  phone[6] = 10077; 
  	}
	public int Login(String us, String pa){
		if(us.equals(username)) { 
			if(pa.equals(password)) {
				return 1;
			}
		}
		else 
			System.out.println("Error! Enter again please!");
			return 0;
	}
	public void ShowCus(){
		System.out.println("============================================");
		System.out.println("|   name   | sex |   address   |   phone   |");
		System.out.println("============================================");
		for(int i=0;i <= username.length;i++){
			System.out.println("|"+username[i]+"|"+sex[i]+"|"+address[i]+"|"+phone[i]+"|");
		}
		System.out.println("============================================");
	}
}




















